//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;
using OpenLS.Drawing.Serialization;

namespace OpenLS.Drawing
{
    public class NonVisualGroupDrawingShapeProps : IOfficeXmlSerializable
    {
        private GroupLocking grpSpLocks;

        public GroupLocking GroupLocking
        {
            get { return grpSpLocks; }
            set { grpSpLocks = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (var c = context.ReadAndSwitch("cNvGrpSpPr", DrawingConstants.DrawingNamespaceUri, false))
            {
                c.PassAttributes();
                GroupLocking = c.ReadOptionalElement<GroupLocking>("grpSpLocks");
                c.WarnIf("ext");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.WriteAndSwitch("cNvGrpSpPr", DrawingConstants.DrawingNamespace))
            {
                c.WriteOptionalElement(GroupLocking);
                c.WarnIf("ext");
            }
        }

        #endregion
    }
}